<!-- 项目接收情况 -->
<template>
	<view class="pageMain u-skeleton">
		<view class="topBox px-3" :style="{ paddingTop: statusBarHeight }">
			<view class="nav d-flex px-4 a-center font-lg text-light" :style="{ height: navBarHeight }"></view>
			<view class="logoBox text-main font-md iconfont icon-back" @click="backFn"></view>
			<view class="logoBox ">
				<view class="d-flex a-center j-sb">
					<view class="font text-h">发布时间：{{ formData.createDateTime }}</view>
					<view class="bg-blue rounded  px-2 py-1 font text-blue">{{ formData.acceptStatusName }}</view>
				</view>
				<view class="font-lg text-main font-weight pb-1">{{ formData.projectName }}</view>
				<view class="u-flex u-row-between pb-1">
					<view class="bg-grey  px-1 py text-primary font">{{ formData.rootInformationEnumName }}</view>
					<view class="text-primary font">
						<image
							class="imagesBox"
							mode="aspectFit"
							style="width: 46rpx ; height: 16rpx;"
							:src="getStaticFilePath('ico-jd.png')"
						></image>
						{{ formData.projectStageName }}
					</view>
				</view>

				<view class="projectBox  rounded-8  line-h-md">
					<view class="d-flex mt-2 a-center">
						<view class="iconfont icon-calendar-todo-fill text-primary"></view>
						<view class="font pl-1 text-677FA0">{{ formData.projectAddressName }}</view>
					</view>
				</view>
			</view>
		</view>

		<view class="d-flex j-sb pt-3 px-3 a-center ">
			<view class=" font-md text-main font-weight">经营信息</view>
			<view class="px-2 py-1 bg-write rounded-8 font text-primary" @click="hanglgAuditHistoryFn">
				变更历史记录
			</view>
		</view>
		<view class="projectBox p-3 m-3 rounded-8 bg-write line-h-md">
			<view class="font-md text-main ">基本信息</view>
			<view class="line-h-md">
				<view class="d-flex a-center">
					<view class="flex-1">
						<text class="text-tips font">信息类型：</text>
						<text class="text-main font ">{{ formData.infoTypeName }}</text>
					</view>
					<view class="flex-1">
						<text class="text-tips font">预计产值规模：</text>
						<text class="text-main font ">{{ formData.outputScale }}</text>
					</view>
				</view>
				<view class="d-flex a-center">
					<view class="flex-1">
						<text class="text-tips font">省份：</text>
						<text class="text-main font ">{{ formData.province }}</text>
					</view>
					<view class="flex-1">
						<text class="text-tips font">城市：</text>
						<text class="text-main font ">{{ formData.city }}</text>
					</view>
				</view>
				<view class="d-flex a-center">
					<view class="flex-1">
						<text class="text-tips font">信息来源：</text>
						<text class="text-main font ">{{ formData.infoSource }}</text>
					</view>
				</view>
				<view class="d-flex a-center">
					<view class="flex-1">
						<text class="text-tips font">项目备注：</text>
						<text class="text-main font ">{{ formData.projectRemark }}</text>
					</view>
				</view>
			</view>
		</view>

		<view class="projectBox p-3 m-3 rounded-8 bg-write line-h-md">
			<view class="font-md text-main ">联系人</view>
			<view class="line-h-md">
				<view class="d-flex a-center">
					<view class="flex-1">
						<text class="text-tips font">联系人：</text>
						<text class="text-main font ">{{ formData.contactPerson }}</text>
					</view>
					<view class="flex-1">
						<text class="text-tips font">联系电话：</text>
						<text class="text-main font ">{{ formData.contactInfomation }}</text>
					</view>
				</view>
			</view>
		</view>
		<view class="projectBox p-3 m-3 rounded-8 bg-write line-h-md">
			<view class="font-md text-main ">项目方</view>
			<view class="line-h-md">
				<view class="d-flex a-center">
					<view class="flex-1">
						<text class="text-tips font">业主方公司名称：</text>
						<text class="text-main font ">{{ formData.ownerCompanyName }}</text>
					</view>
				</view>
				<view class="d-flex a-center">
					<view class="flex-1">
						<text class="text-tips font">施工方公司名称：</text>
						<text class="text-main font ">{{ formData.constructionName }}</text>
					</view>
				</view>
			</view>
		</view>
		<view class="px-3 font-md text-main font-weight ">接收情况</view>

		<view
			class="projectBox p-3 m-3 rounded-8 bg-write line-h-md"
			v-for="(item, index) in formData.busiIndustryAssignList"
			:key="index"
		>
			<view class="font-md text-main font-weight pb-1">{{ item.industryName }}</view>
			<view
				class="line-h-md bg-grey-3 p-2 mb-2 rounded-8"
				v-for="(x, i) in item.busiIndustryCompanyList"
				:key="i"
			>
				<view class="d-flex a-center">
					<view class="flex-1 text-h font">{{ x.notificationWayName }}</view>
					<view
						v-if="x.receiveStatus == 'UnReceive'"
						class="rounded  px-2 py-1 font text-light"
						:class="x.receiveStatus == 'UnReceive' ? 'bg-success-1 text-primary' : ''"
					>
						{{ x.receiveStatusName }}
					</view>
					<view
						v-if="x.receiveStatus == 'Receive'"
						class="rounded  px-2 py-1 font text-light"
						:class="x.receiveStatus == 'Receive' ? 'bg-yellow-2 text-yellow' : ''"
					>
						{{ x.receiveStatusName }}
					</view>
					<view
						v-if="x.receiveStatus == 'Refulse'"
						class="rounded  px-2 py-1 font text-light"
						:class="x.receiveStatus == 'Refulse' ? 'bg-error-2 text-yellow' : ''"
					>
						{{ x.receiveStatusName }}
					</view>
				</view>
				<view class="d-flex a-center">
					<view class="flex-1 text-h font-weight font-sm">{{ x.companyName }}</view>
				</view>
				<view class="flex-1">
					<text class="text-tips font">拒收理由：</text>
					<text class="text-h font font-weight">{{ x.reasonForRejection }}</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
import { getbusiInfoData } from '@/api/apis.js';
export default {
	data() {
		return {
			statusBarHeight: '',
			navBarHeight: '',
			formData: {},
			feedbackPhaseList: []
		};
	},
	onLoad() {
		if (this.$Route.query.busiInfoId) {
			this.getbusiInfoDataFn(this.$Route.query.busiInfoId);
		}
		/*#ifdef MP*/
		let that = this;
		uni.getSystemInfo({
			success: function(info) {
				// 屏幕高度
				let screenHeight = info.screenHeight;
				// 屏幕宽度
				let screenWidth = info.screenWidth;
				// 胶囊高度
				//状态栏高度
				that.statusBarHeight = info.statusBarHeight * 2 + 'rpx';
				let menuButtonInfo = uni.getMenuButtonBoundingClientRect();
				let navBarHeight = menuButtonInfo.bottom + menuButtonInfo.top - screenHeight;
				that.navBarHeight = navBarHeight + screenHeight - info.statusBarHeight + 'rpx';
			}
		});
		/*#endif*/
	},
	methods: {
		//获取项目详情
		getbusiInfoDataFn(id) {
			getbusiInfoData({
				busiInfoId: id
			}).then(res => {
				if (res.code == 10000) {
					this.formData = res.data;
				} else {
					this.$u.toast(res.msg);
				}
			});
		},
		backFn() {
			this.$Router.back();
		},
		//变更历史记录
		hanglgAuditHistoryFn() {
			this.$Router.push({
				path: '/detailPages/pages/projectDetailsChangeHistory/index',
				query: {
					busiInfoId: this.$Route.query.busiInfoId
				}
			});
		}
	}
};
</script>

<style lang="scss" scoped>
.pageMain {
	width: 100%;
	height: 100%;
	.topBox {
		background: linear-gradient(180deg, rgba(45, 143, 255, 0.4), rgba(190, 214, 250, 0) 100%);
		background-repeat: no-repeat;
		background-size: 100% 100%;
		.logoBox {
			padding-top: 40rpx;
		}
	}
	.lable60 {
		width: 120rpx;
	}
}
</style>
